﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace MS.Utility.Config
{
    public class EmailConfig
    {
        private static string _MailSmtp;
        public static string MailSmtp
        {
            get
            {
                if (_MailSmtp == null)
                {
                    _MailSmtp = ConfigurationManager.AppSettings["MailSmtp"].ToString();
                }
                return _MailSmtp;
            }
        }

        private static int _MailPort;
        public static int MailPort
        {
            get
            {
                if (_MailPort == 0)
                {
                    _MailPort = Convert.ToInt32(ConfigurationManager.AppSettings["MailPort"].ToString());
                }
                return _MailPort;
            }
        }

        private static string _SentMail;
        public static string SentMail
        {
            get
            {
                if (_SentMail == null)
                {
                    _SentMail = ConfigurationManager.AppSettings["SentMail"].ToString();
                }
                return _SentMail;
            }
        }

        private static string _MailPwd;
        public static string MailPwd
        {
            get
            {
                if (_MailPwd == null)
                {
                    _MailPwd = ConfigurationManager.AppSettings["MailPwd"].ToString();
                }
                return _MailPwd;
            }
        }

        private static string _MailShowName;
        public static string MailShowName
        {
            get
            {
                if (_MailShowName == null)
                {
                    _MailShowName = ConfigurationManager.AppSettings["MailShowName"].ToString();
                }
                return _MailShowName;
            }
        }

        private static string _ServiceMail;
        public static string ServiceMail
        {
            get
            {
                if (_ServiceMail == null)
                {
                    _ServiceMail = ConfigurationManager.AppSettings["ServiceMail"].ToString();
                }
                return _ServiceMail;
            }
        }

        private static string _SysErrorMailTo;
        public static string SysErrorMailTo
        {
            get
            {
                if (_SysErrorMailTo == null)
                {
                    _SysErrorMailTo = ConfigurationManager.AppSettings["SysErrorMailTo"].ToString();
                }
                return _SysErrorMailTo;
            }
        }
        /// <summary>
        /// 举报文档邮箱
        /// </summary>
        private static string _ReportedMailTo;
        public static string ReportedMailTo
        {
            get
            {
                if (_ReportedMailTo == null)
                {
                    _ReportedMailTo = ConfigurationManager.AppSettings["ReportedMailTo"].ToString();
                }
                return _ReportedMailTo;
            }
        }
    }
}

